Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify Swift 4.2 in podspecs #297

Merged
merged 3 commits into from
May 18, 2019
Merged

Specify Swift 4.2 in podspecs #297

merged 3 commits into from
May 18, 2019

Conversation

notjosh
Copy link
Contributor

@notjosh notjosh commented May 17, 2019

Hiya 👋!

I bumped my project to Swift 5, and started getting some classic "this isn't Swift 5" errors:

Add () to forward @autoclosure parameter

Looking into the podspec, PiwikTracker.podspec specifies Swift 4.1 (via #267, #260), but MatomoTracker.podspec doesn't mention anything at all. Meanwhile .swift-version specifies Swift 4.2.

This PR brings them all into line as Swift 4.2 consistently.

And just in case anyone else is having issues, here's the workaround in your Podfile until this is published:

post_install do |installer|
  swifts = {
    'MatomoTracker' => '4.2'
    # ...specify any other Pods with Swift 4.x requirements here if necessary
  }

  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = swifts[target.name] if swifts.has_key?(target.name)
    end
  end
end

@brototyp-bot
Copy link

brototyp-bot commented May 17, 2019

1 Warning
⚠️ Are there any changes that should be explained in the README.md?

Generated by 🚫 Danger

@brototyp
Copy link
Member

Hey @notjosh, thanks a lot! Looks really good.

@brototyp brototyp merged commit 50b12d0 into matomo-org:develop May 18, 2019
@notjosh
Copy link
Contributor Author

notjosh commented May 22, 2019

Do you think you'd be able to bump a 6.0.1 release with support for this some time soon?

@brototyp
Copy link
Member

Hey @notjosh, absolutely. Thanks for asking. I just released v6.0.1 including this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants